! function(d) {
    var c = function(b, f) {
        var e = /[^\w\-\.:]/.test(b) ? new Function(c.arg + ",tmpl", "var _e=tmpl.encode" + c.helper + ",_s='" + b.replace(c.regexp, c.func) + "';return _s;") : c.cache[b] = c.cache[b] || c(c.load(b));
        return f ? e(f, c) : function(g) {
            return e(g, c)
        }
    };
    c.cache = {}, c.load = function(b) {
        return document.getElementById(b).innerHTML
    }, c.regexp = /([\s'\\])(?!(?:[^{]|\{(?!%))*%\})|(?:\{%(=|#)([\s\S]+?)%\})|(\{%)|(%\})/g, c.func = function(h, g, l, k, j, i) {
        return g ? {
            "\n": "\\n",
            "\r": "\\r",
            "	": "\\t",
            " ": " "
        }[g] || "\\" + g : l ? "=" === l ? "'+_e(" + k + ")+'" : "'+(" + k + "==null?'':" + k + ")+'" : j ? "';" : i ? "_s+='" : void 0
    }, c.encReg = /[<>&"'\x00]/g, c.encMap = {
        "<": "&lt;",
        ">": "&gt;",
        "&": "&amp;",
        '"': "&quot;",
        "'": "&#39;"
    }, c.encode = function(b) {
        return (null == b ? "" : "" + b).replace(c.encReg, function(e) {
            return c.encMap[e] || ""
        })
    }, c.arg = "o", c.helper = ",print=function(s,e){_s+=e?(s==null?'':s):_e(s);},include=function(s,d){_s+=tmpl(s,d);}", "function" == typeof define && define.amd ? define(function() {
        return c
    }) : d.tmpl = c
}(this);
